
/*****************************************************************/
///*** figure political experience - by differences b/w dem nodem   ***///
/*****************************************************************/



clear
use estimation_gamma_vars


/* all included in PolAnyPost but w/o partyleader and partygensec */
collapse (mean) exPM vicepres preindepleader expresident minfin minforeign vicePM politburomember  ///
housespeaker senatespeaker deputyhousespeaker mayorcapital   governor   mayorother regionpolitician mininterior ///
minjustice mineduc mineconomy    minhealth  minchiefofstaff minagriculture   mintrade mintransport minlabour ///
minpublicworks minlocalgovt   minbudget mincommunication   minenvironment  ministerother  mindefence headsecurity ///
eu_commission MEP deputyminister centralbankgov diplomat, by(entrydem)


/* transpose in excel*/
clear
use posts_by_diff
sort cats
merge cats using cats
drop _merge
save posts_by_regime_diff, replace


gen diff= depvar1- depvar0
gen diff2=(diff*100)/(depvar0+ depvar1)
gsort -diff2
sencode variables, gen(vars)
gen depvar2 = -depvar1


graph hbar (asis) depvar0 depvar2,  ///
     over(vars,  label(labsize(small))) ///
     ylabel( -.10 "10" -.05 "5" 0 "0" ///
            .05 "5" .1 "10" , labsize(vsmall)) graphregion(m(l+3)) ///
             bargap(-100)  ysize(8) xsize(6) scheme(s1mono) bar(1,color(black)) ///
             legend(order(2 1) label(1 "Dictatorship") label(2 "Democracy") ///
             size(small) region(lstyle(none)))
             
             
graph save posts_diff.pdf, replace             



           
             
             
